;(function(win) {
	var WeatherEngine = function() {
		return new WeatherEngine.init();
	}
	
	var weatherEngineProps = WeatherEngine.prototype;
	WeatherEngine.init = function() {};
	WeatherEngine.init.prototype = weatherEngineProps;
	WeatherEngine.version ={};
	WeatherEngine.version.number = "1.0.0.RELEASE";
	WeatherEngine.version.author = "yumi@omuao.com";
	weatherEngineProps.setWorldOptions = function(options) {
		this.worldOptions = options;
	}
	
	win.WeatherEngine = WeatherEngine;
	
	//初始化环境引擎
	if(win.JadeEngine != null && typeof win.JadeEngine !== "undefined" ){
		JadeEngine.World.prototype.setWeatherEngine = function(weatherEngine){
			if(!weatherEngine instanceof WeatherEngine){
				throw "WeatherEngine is not set";
			}
			weatherEngine.setWordOptions(this);
			this.weatherEngine = weatherEngine;
			return this.weatherEngine;
		}
		JadeEngine.World.prototype.getWeatherEngine = function(){
			if(this.weatherEngine == null || typeof this.weatherEngine === "undefined") {
				this.weatherEngine = new WeatherEngine();
				this.weatherEngine.setWorldOptions(this);
			}
			return this.weatherEngine;
		}
		JadeEngine.World.prototype.getWeatherEngineVersionInfo = function(){
			return WeatherEngine.version;
		}
	}
}(window));